home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / graphics / RastPort.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  5KB  |  152 lines

  1. #ifndef GRAPHICS_RASTPORT_H
  2. #define GRAPHICS_RASTPORT_H 1
  3. /*
  4. ** rastport.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for rastport.h
  17. */
  18. #ifndef AreaInfoPtr
  19. #define AreaInfoPtr ADDRESS
  20. #endif
  21. #ifndef GelsInfoPtr
  22. #define GelsInfoPtr ADDRESS
  23. #endif
  24. #ifndef RastPortPtr
  25. #define RastPortPtr ADDRESS
  26. #endif
  27. #ifndef TmpRasPtr
  28. #define TmpRasPtr ADDRESS
  29. #endif
  30. /*
  31. ** End of StructPointer defines for rastport.h
  32. */
  33.        
  34. #ifndef EXEC_TYPES_H
  35. #include <exec/types.h>
  36. #endif
  37.  
  38. #ifndef GRAPHICS_GFX_H
  39. #include <graphics/gfx.h>
  40. #endif
  41.  
  42. #ifndef GRAPHICS_GELS_H
  43. #include <graphics/gels.h>
  44. #endif
  45.  
  46. #ifndef GRAPHICS_TEXT_H
  47. #include <graphics/text.h>
  48. #endif
  49.  
  50.  
  51.  
  52. STRUCT AreaInfo
  53.  
  54.     ADDRESS   VctrTbl          /* ptr to start of vector table */
  55.     ADDRESS   VctrPtr          /* ptr to current vertex */
  56.     ADDRESS   FlagTbl          /* ptr to start of vector flag table */
  57.     ADDRESS   FlagPtr          /* ptrs to areafill flags */
  58.     SHORTINT   Count         /* number of vertices in list */
  59.     SHORTINT   MaxCount          /* AreaMove/Draw will not allow Count>MaxCount*/
  60.     SHORTINT   FirstX 
  61.     SHORTINT  FirstY     /* first point for this polygon */
  62. END STRUCT 
  63.  
  64. STRUCT TmpRas
  65.  
  66.     ADDRESS   RasPtr 
  67.     LONGINT _Size 
  68. END STRUCT 
  69.  
  70. /* unoptimized for 32bit alignment of pointers */
  71. STRUCT GelsInfo
  72.  
  73.     BYTE sprRsrvd         /* flag of which sprites to reserve from
  74.                  vsprite _system */
  75.     BYTE  Flags           /* system use */
  76.     VSpritePtr  gelHead 
  77.     VSpritePtr  gelTail  /* dummy vSprites for list management*/
  78.     /* pointer to array of 8 WORDS for sprite available lines */
  79.     ADDRESS   nextLine 
  80.     /* pointer to array of 8 pointers for color-last-assigned to vSprites */
  81.     ADDRESS   lastColor
  82.     collTablePtr  collHandler      /* addresses of collision routines */
  83.     SHORTINT leftmost 
  84.     SHORTINT   rightmost 
  85.     SHORTINT   topmost 
  86.     SHORTINT   bottommost 
  87.     ADDRESS firstBlissObj
  88.     ADDRESS lastBlissObj     /* SYSTEM use only */
  89. END STRUCT 
  90.  
  91. STRUCT RastPort
  92.  
  93.     LayerPtr  Layer 
  94.     BitMapPtr  BitMap 
  95.     ADDRESS   AreaPtrn         /* ptr to areafill pattern */
  96.     TmpRasPtr  TmpRas 
  97.     AreaInfoPtr  AreaInfo 
  98.     GelsInfoPtr  GelsInfo 
  99.     BYTE    Mask          /* write mask for this raster */
  100.     BYTE    FgPen         /* foreground pen for this raster */
  101.     BYTE    BgPen         /* background pen  */
  102.     BYTE    AOlPen        /* areafill outline pen */
  103.     BYTE    DrawMode          /* drawing mode for fill,  lines,  and text */
  104.     BYTE    AreaPtSz          /* 2^n words for areafill pattern */
  105.     BYTE    linpatcnt         /* current line drawing pattern preshift */
  106.     BYTE    dummy 
  107.     SHORTINT  Flags         /* miscellaneous control bits */
  108.     SHORTINT  LinePtrn          /* 16 bits for textured lines */
  109.     SHORTINT   cp_x 
  110.     SHORTINT   cp_y        /* current pen position */
  111.     STRING minterms SIZE 8  
  112.     SHORTINT   PenWidth 
  113.     SHORTINT   PenHeight 
  114.     TextFontPtr  _Font    /* current font address */
  115.     BYTE    AlgoStyle         /* the algorithmically generated style */
  116.     BYTE    TxFlags           /* text specific flags */
  117.     SHORTINT   TxHeight          /* text height */
  118.     SHORTINT   TxWidth           /* text nominal width */
  119.     SHORTINT   TxBaseline        /* text baseline */
  120.     SHORTINT    TxSpacing         /* text spacing (per character) */
  121.     ADDRESS    RP_User
  122.     STRING longreserved SIZE 8  /* 2*SIZEOF(LONGINT) */
  123. #ifndef GFX_RASTPORT_1_2
  124.     STRING wordreserved SIZE 14  /* 7*SIZEOF(SHORTINT) */  /* used TO be a node */
  125.     STRING reserved SIZE 8        /* for future use */
  126. #endif
  127. END STRUCT 
  128.  
  129. /* drawing modes */
  130. #define JAM1        0         /* jam 1 color into raster */
  131. #define JAM2        1         /* jam 2 colors into raster */
  132. #define COMPLEMENT  2         /* XOR bits into raster */
  133. #define INVERSVID   4         /* inverse video for drawing modes */
  134.  
  135. /* these are the flag bits for RastPort flags */
  136. #define FRST_DOT    &H01      /* draw the first dot of this line ? */
  137. #define ONE_DOT     &H02      /* use one dot mode for drawing lines */
  138. #define DBUFFER     &H04      /* flag set when RastPorts
  139.                  are double-buffered */
  140.  
  141.          /* only used for bobs */
  142.  
  143. #define AREAOUTLINE &H08      /* used by areafiller */
  144. #define NOCROSSFILL &H20      /* areafills have no crossovers */
  145.  
  146. /* there is only one style of clipping: raster clipping */
  147. /* this preserves the continuity of jaggies regardless of clip window */
  148. /* When drawing into a RastPort,  if the ptr to ClipRect is nil then there */
  149. /* is no clipping done,  this is dangerous but useful for speed */
  150.  
  151. #endif  /* GRAPHICS_RASTPORT_H */
  152.